"""定义图层弹出模型类的文件."""
from datetime import datetime
from enum import Enum

from fastapi import Query
from pydantic import BaseModel, Field

class Device(Enum):
    """访问设备"""
    PC = 'pc'
    MOBILE = 'mobile'


class DeviceRequest(BaseModel):
    """图层弹出查询 API 请求模型"""
    device: Device = Field(Query(default="pc", title="访问设备", description="访问设备"))


class NewwinResponse(BaseModel):
    """"图层弹出查询 API 响应模型"""
    nw_id: int
    nw_division: str
    nw_device: str
    nw_begin_time: datetime
    nw_end_time: datetime
    nw_disable_hours: int
    nw_left: int
    nw_top: int
    nw_height: int
    nw_width: int
    nw_subject: str
    nw_content: str
